package com.ztewatch.wearcontacts;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.ztewatch.wearcontacts.service.WearContactSaveService;

public abstract class WearContactBaseActivity extends Activity implements
		WearContactSaveService.Listener {
	public static final String ACTION_EDIT_CONTACT_COMPLETED = "editContactCompleted";
	public static final String ACTION_SAVE_CONTACT_COMPLETED = "saveContactCompleted";
	public static final String ACTION_UPDATE_CONTACT_COMPLETED = "updateContactCompleted";
	public static final String ACTION_DELETE_CONTACT_COMPLETED = "deleteContactCompleted";
	public static final String ACTION_SAVE_GROUP_COMPLETED = "saveGroupCompleted";
	public static final String ACTION_UPDATE_GROUP_COMPLETED = "updateGroupCompleted";
	public static final String ACTION_DELETE_GROUP_COMPLETED = "deleteGroupCompleted";
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		WearContactSaveService.registerListener(this);
		super.onCreate(savedInstanceState);
	}

	@Override
	protected void onDestroy() {
		WearContactSaveService.unregisterListener(this);
		super.onDestroy();
	}

	@Override
	public void onServiceCompleted(Intent callbackIntent) {
		onNewIntent(callbackIntent);
	}
}
